home *** CD-ROM | disk | FTP | other *** search
- program main;
- uses fgmain, fgmisc;
-
- var
- old_mode : integer;
- buttons, count : integer;
- x, y : integer;
- message : string[25];
- strx, stry : string[4];
- strcount : string[5];
-
- begin
- old_mode := fg_getmode;
- fg_setmode(fg_automode);
-
- if (fg_mouseini < 0) then
- begin
- fg_setmode(old_mode);
- fg_reset;
- exit;
- end;
-
- fg_setcolor(15);
- fg_rect(0,fg_getmaxx,0,fg_getmaxy);
- fg_mousevis(1);
-
- repeat
- begin
- fg_waitfor(54);
- fg_mousebut(1,count,x,y);
- fg_mousepos(x,y,buttons);
- str(x:3,strx);
- str(y:3,stry);
- str(count:4,strcount);
- message := 'X=' + strx + ' Y=' + stry + ' count=' + strcount;
- fg_mousevis(0);
- fg_setcolor(15);
- fg_rect(0,fg_xconvert(25),0,fg_yconvert(1));
- fg_setcolor(0);
- fg_locate(0,0);
- fg_text(message,24);
- fg_mousevis(1);
- fg_mousebut(2,count,x,y);
- end;
- until (count > 0);
-
- fg_setmode(old_mode);
- fg_reset;
- end.